{extend name="shop/showstore/common/store_layout" /}
{block name="content"}

<?php 
//加载店铺装修静态页
if(isset($decoration_file)) { 
    require($decoration_file);
} 
?>
<?php if(!$store_decoration_only) {?>
<div class="wrapper" style="width:100%; margin:0 auto; text-align:center">
<div class="flexslider">
      <ul class="slides">
        <?php if(!empty($store_slide) && is_array($store_slide)){?>
        <?php for($i=0;$i<5;$i++){?>
        <?php if($store_slide[$i] != ''){?>
        <li><a style="background: url('__UPLOAD_PATH__/shop/store/slide/{$store_slide[$i]}') no-repeat center center;" <?php if($store_slide_url[$i] != '' && $store_slide_url[$i] != 'http://'){?>href="<?php echo $store_slide_url[$i];?>"<?php }?>></a></li>
        <?php }?>
        <?php }?>
        <?php }else{?>        
        <li><a style="background:url('__UPLOAD_PATH__/shop/store/slide/f01.jpg') no-repeat center center;" href="javascript:;"></a></li>
        <li><a style="background: url('__UPLOAD_PATH__/shop/store/slide/f02.jpg') no-repeat center center;" href="javascript:;"></a></li>
        <li><a style="background: url('__UPLOAD_PATH__/shop/store/slide/f03.jpg') no-repeat center center;" href="javascript:;"></a></li>
        <li><a style="background: url('__UPLOAD_PATH__/shop/store/slide/f04.jpg') no-repeat center center;" href="javascript:;"></a></li>
        <?php }?>
      </ul>
    </div>
</div>  
  
<div id="main">
	<div class="container">
		<ul id="list1">
			<!--背景图一-->
			<?php if(!empty($store_bg[0])){?>
				<img src="__UPLOAD_PATH__/shop/store/slide/{$store_bg[0]}">
			<?php }else{?>
				<img src="__SHOP_DEFAULT__/store/style/style1/images/cha-1.png">
			<?php }?>
			
			
			
			{volist name="town_goods_list" id="vo" length='2'}
				<a href="{:url('shop/Goods/index',array('goods_id'=>$vo['goods_id']))}" title="{$vo['goods_name']}">
					{if($i == 1)}
						<li class="one" id="list1-one">
					{else /}
						<li class="one" id="list1-two">
					{/if}
						<img src="{:cthumb($vo['goods_image'], 360,$vo['store_id'])}">
						<p><nobr>{$vo['goods_name']}</nobr></p>
						<h5><nobr>{$vo['goods_jingle']}</nobr></h5>
						<button>活动价</button>
						<span>￥{$vo['goods_promotion_price']}</span>
					</li>
				</a>
			{/volist}
			<div id="list1-bottom">
				{if ($store_goods_class)}
					{volist name="store_goods_class" id="vo"}
						<div><img src="__SHOP_DEFAULT__/store/style/style1/images/cha.png"></div>
						<a href="{:url('shop/Showstore/goods_all',array('store_id'=>$vo['store_id'],'stc_id'=>$vo['stc_id']))}">{$vo['stc_name']}</a>
					{/volist}
				{/if}
			</div>
		</ul>
	</div>
			
	<div class="container">
		<ul id="list2">
			<!--背景图二-->
			<?php if(!empty($store_bg[1])){?>
				<img src="__UPLOAD_PATH__/shop/store/slide/{$store_bg[1]}">
			<?php }else{?>
				<img src="__SHOP_DEFAULT__/store/style/style1/images/1_03.jpg">
			<?php }?>
				
			
		
			<ul class="top">
				{volist name="new_goods_list" id="vo" length='3'}
					<a href="{:url('shop/Goods/index',array('goods_id'=>$vo['goods_id']))}" title="{$vo['goods_name']}">
						<li class="two" id="hot1">
							<img src="{:cthumb($vo['goods_image'], 240,$vo['store_id'])}">
							<p><nobr>{$vo['goods_name']}</nobr></p>
							<span>￥{$vo['goods_promotion_price']}</span>
							<button>加入购物车</button>
						</li>
					</a>
				{/volist}
			</ul>
			<ul class="bottom">
				{volist name="new_goods_list" id="vo" offset="3" length='3'}
					<a href="{:url('shop/Goods/index',array('goods_id'=>$vo['goods_id']))}" title="{$vo['goods_name']}">
						<li class="two" id="hot2">
							<img src="{:cthumb($vo['goods_image'], 240,$vo['store_id'])}">
							<p><nobr>{$vo['goods_name']}</nobr></p>
							<span>￥{$vo['goods_promotion_price']}</span>
							<button>加入购物车</button>
						</li>
					</a>
				{/volist}
			</ul>
		</ul>
	</div>
			
	<div class="container">
		<ul id="list3">
			<!--背景图三-->
			<?php if(!empty($store_bg[2])){?>
				<img src="__UPLOAD_PATH__/shop/store/slide/{$store_bg[2]}">
			<?php }else{?>
				<img src="__SHOP_DEFAULT__/store/style/style1/images/1_04.jpg">
			<?php }?>
			
			
			<!--广告一-->
			<?php if(!empty($store_adv[0])){?>
				<a href="{$store_adv_url[0]}">
					<li class="one">
						<img src="__UPLOAD_PATH__/shop/store/slide/{$store_adv[0]}">
					</li>
				</a>
			<?php }else{?>
				<a href="#">
					<li class="one">
						<img src="__SHOP_DEFAULT__/store/style/style1/images/shop_02.png">
					</li>
				</a>
			<?php }?>
		</ul>
	</div>
			
	<div class="container">
		<ul id="list4">
			<!--背景图四-->
			<?php if(!empty($store_bg[3])){?>
				<img src="__UPLOAD_PATH__/shop/store/slide/{$store_bg[3]}">
			<?php }else{?>
				<img src="__SHOP_DEFAULT__/store/style/style1/images/1_05.jpg">
			<?php }?>
			
			
			<ul class="first">
				{volist name="recommended_goods_list" id="vo" length='3'}
					<a href="{:url('shop/Goods/index',array('goods_id'=>$vo['goods_id']))}" title="{$vo['goods_name']}">
						<li class="one">
							<img src="{:cthumb($vo['goods_image'], 240,$vo['store_id'])}" class="last">
							<p><nobr>{$vo['goods_name']}</nobr></p>
							<span>￥{$vo['goods_promotion_price']}</span><button>加入购物车</button>
						</li>
					</a>
				{/volist}
			</ul>
				
			<ul class="second">
				{volist name="recommended_goods_list" id="vo" offset="3" length='3'}
					<a href="{:url('shop/Goods/index',array('goods_id'=>$vo['goods_id']))}" title="{$vo['goods_name']}">
						<li class="one">
							<img src="{:cthumb($vo['goods_image'], 240,$vo['store_id'])}" class="last">
							<p><nobr>{$vo['goods_name']}</nobr></p>
							<span>￥{$vo['goods_promotion_price']}</span><button>加入购物车</button>
						</li>
					</a>
				{/volist}
			</ul>			
		</ul>
	</div>

</div>
		


<!-- 引入幻灯片JS --> 
<script type="text/javascript" src="__SITE_RESOURCE__/js/jquery.flexslider-min.js"></script> 
<!-- 绑定幻灯片事件 --> 
<script type="text/javascript">
	$(window).load(function() {
		$('.flexslider').flexslider();


	    // 图片切换效果
	    $('.goods-thumb-scroll-show').find('a').mouseover(function(){
	        $(this).parents('li:first').addClass('selected').siblings().removeClass('selected');
	        var _src = $(this).find('img').attr('src');
	        _src = _src.replace('_60.', '_240.');
	        _src = _src.replace('-60', '-240');
	        $(this).parents('dt').find('.goods-thumb').find('img').attr('src', _src);
	    });
	});
</script>
<?php } ?>
	
{/block}
